package com.softme.trade.control;

import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import com.softme.trade.view.components.MenuModel;

@ManagedBean(name = "menuController")
@SessionScoped
public class MenuController
{

	private List<MenuModel> menus = new ArrayList<MenuModel>();

	public MenuController()
	{

		//=========================== Menu Cliente ============================

		MenuModel menuModel = new MenuModel("Cliente");
		menuModel.getSubMenu().add(
				new MenuModel("Cliente", "Cotações ", "empty.xhtml", "", "table_edit.png", "cotacoes"));
		menuModel.getSubMenu().add(
				new MenuModel("Cliente", "Pedidos", "empty.xhtml", "", "cart.png", "visualizarPedidos"));
		menuModel.getSubMenu().add(
				new MenuModel("Cliente", "Departamento comercial", "empty.xhtml", "",
						"user_green.png", "departamentoComercial"));
		menus.add(menuModel);

		//=========================== Menu Usuário ============================

		menuModel = new MenuModel("Usuário");
		menuModel.getSubMenu().add(
				new MenuModel("Usuário", "Alterar Senha", "empty.xhtml", "", "Usuário.png", "alterarSenha"));
		menus.add(menuModel);

		//=========================== Menu Desktop ============================

		menuModel = new MenuModel("Desktop");
		menuModel.getSubMenu().add(
				new MenuModel("Desktop", "Gerenciar Documentos Desktop ",
						"empty.xhtml", "", "Desktop.png", "gerenciarDocumentosDesktop"));
		menus.add(menuModel);

		//=========================== Menu Operacional ============================

		menuModel = new MenuModel("Operacional");
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Cotação", "empty.xhtml", "", "Operacional.png", "operacionalCotacao"));
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Pedido", "empty.xhtml", "", "Operacional.png", "operacionalPedido"));
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Fornecedores", "empty.xhtml", "", "Operacional.png", "operacionalFornecedores"));
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Tipos de documento", "empty.xhtml", "",
						"Operacional.png", "operacionalTipoDocumento"));
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Cidades", "empty.xhtml", "", "Operacional.png", "operacionalCidades"));
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Países", "empty.xhtml", "", "Operacional.png", "operacionalPaises"));
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Wizard - Nova empresa", "empty.xhtml",
						"", "Operacional.png", "operacionalWizardNovaEmpresa"));
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Empresas", "firm.xhtml", "", "Operacional.png", "operacionalEmpresas"));
		
		menuModel.getSubMenu().add(
				new MenuModel("Operacional", "Moeda", "currency.xhtml", "", "Operacional.png", "operacionalMoeda"));
		menus.add(menuModel);

		//=========================== Menu Análise ============================

		menuModel = new MenuModel("Análises");
		menuModel.getSubMenu().add(
				new MenuModel("Análises", "Manual de operações", "empty.xhtml", "",
						"Análises.png", "analiseManualDeOperacoes"));
		menuModel.getSubMenu().add(
				new MenuModel("Análises", "Cotações e Pedidos", "empty.xhtml", "",
						"Análises.png", "analisesCotacoesPedidos"));
		menuModel.getSubMenu().add(
				new MenuModel("Análises", "Tráfico portuário", "empty.xhtml", "",
						"Análises.png", "analisesTraficoPortuario"));
		menuModel.getSubMenu().add(
				new MenuModel("Análises", "Avaliação do cliente	", "empty.xhtml", "",
						"Análises.png", "analiseAvaliacaoDoCliente"));
		menus.add(menuModel);

		//=========================== Menu Portlets ============================

		menuModel = new MenuModel("Portlets");
		menuModel.getSubMenu().add(
				new MenuModel("Portlets", "Usuário com maior acesso",
						"empty.xhtml", "", "Portlets.png", "portLetsUsuarioComMaiorAcesso"));
		menuModel.getSubMenu().add(
				new MenuModel("Portlets", "Cotação e pedido",
						"empty.xhtml", "", "Portlets.png", "portletCotacaoPedido"));
		menuModel.getSubMenu().add(
				new MenuModel("Portlets", "Tráfego portuário",
						"empty.xhtml", "", "Portlets.png", "portletTrafegoPortuario"));
		menuModel.getSubMenu().add(
				new MenuModel("Portlets", "Avaliação do cliente ",
						"empty.xhtml", "", "Portlets.png", "portletAvaliacaoCliente"));
		menus.add(menuModel);

		//=========================== Menu Administracao ============================

		menuModel = new MenuModel("Administração");
		menuModel.getSubMenu().add(
				new MenuModel("Administração", "Usuários", "user.xhtml", "", "user.png", "administracaoUsuarios"));
		menuModel.getSubMenu().add(
				new MenuModel("Administração", "Regras de negócio", "empty.xhtml", "",
						"Administração.png", "administracaoRegrasNegocio"));
		menuModel.getSubMenu().add(
				new MenuModel("Administração", "Fluxo de trabalho", "empty.xhtml", "",
						"Administração.png", "adminitracaoFluxoTrabalho"));
		menuModel.getSubMenu().add(
				new MenuModel("Administração", "Configurações ", "empty.xhtml", "",
						"Administração.png", "administracaoConfiguracoes"));
		menuModel.getSubMenu().add(
				new MenuModel("Administração", "Manutenção do sistema", "empty.xhtml", "",
						"Administração.png", "administracaoManutencaoSistema"));
		menus.add(menuModel);

	}

	public List<MenuModel> getMenus()
	{
		return menus;
	}

}
